home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig11_11.jar
/
Ch11
/
Fig11_11
/
Fig11_11.cpp
Wrap
C/C++ Source or Header
|
1997-11-09
|
476b
|
22 lines
// Fig. 11.11: fig11_11.cpp
// Stream-extraction operator returning false on end-of-file.
#include <iostream.h>
int main()
{
int grade, highestGrade = -1;
cout << "Enter grade (enter end-of-file to end): ";
while ( cin >> grade ) {
if ( grade > highestGrade )
highestGrade = grade;
cout << "Enter grade (enter end-of-file to end): ";
}
cout << "\n\nHighest grade is: " << highestGrade << endl;
return 0;
}